package cn.wp.ewallet.common.web.controller;

import cn.wp.common.core.Wp;
import cn.wp.common.core.dto.WpResult;
import cn.wp.ewallet.common.service.MoneyTypeInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 币种信息-控制层
 * Created by zhangyongli on 2020/01/13
 */
@RestController
@RequestMapping(Wp.WebContext + "/ewallet/common/moneyType")
@Api(tags="币种信息")
public class MoneyTypeInfoController {

    @Autowired
    private MoneyTypeInfoService moneyTypeInfoService;


    @GetMapping("/getAll")
    @ApiOperation("查询全部币种信息")
    public WpResult getMoneyTypeInfo(){
        return new WpResult().success(moneyTypeInfoService.getMoneyTypeInfo());
    }

    @GetMapping("/getById")
    @ApiOperation("根据币种ID查询币种信息")
    public WpResult getMoneyTypeInfoByMoneyTypeId(String moneyTypeId){
        return new WpResult().success(moneyTypeInfoService.getMoneyTypeInfoByMoneyTypeId(moneyTypeId));
    }

}
